<template>
    <div class="show-day">
        <a href="#" v-for="(item, index) in showDaysList" :key="index" @click="changeIndex(index)">{{ item.date }}</a>
    </div>
</template>

<script setup>
import { defineProps, ref } from "@vue/runtime-core";

defineProps({
    showDaysList: {
        type: Array,
        default: function () {
            return [];
        },
    },
});

const current = ref(0);
const changeIndex = (index) => {
    console.log("index:", index);
    current.value = index;
};
</script>

<style lang="less" scoped>
.show-day {
    height: 45px;
    width: 100%;
    overflow-x: scroll;
    white-space: nowrap;
    .flex-center-between();
    border-bottom: 1px solid #e5e5e5;
    a {
        display: inline-block;
        font-size: 14px;
        text-align: center;
        min-width: 115px;
        line-height: 45px;
        margin-left: 4.5px;
    }
}
</style>
